package com.example.user.controller;



import com.example.user.entity.CrmBanner;
import com.example.user.service.CrmBannerService;
import com.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-07-10
 */
@RestController
@RequestMapping("/cms/banner")
@CrossOrigin
public class CrmBannerFrontController {

    @Autowired
    CrmBannerService crmBannerService;


    @GetMapping("getBanner")
    public Result getBanner(){

        List<CrmBanner> bannerList = crmBannerService.getBanner();


        return Result.ok().data("bannerList",bannerList);
    }

}

